﻿using System;
using AlgorithmWithCS.StringAlgorithm;
using AlgorithmWithCS.TreeAlgorithm;

namespace AlgorithmWithCS
{
    public static class Program
    {
        public static void Main()
        {
            // var mainStr = "abcabcbbw";
            // var subStr = "bcb";
            // var index = SubStrMatch.SimpleIndexOfSubStr(mainStr, subStr);
            // Console.WriteLine($"朴素匹配模式：{subStr}在{mainStr}中首次出现的位置是{index}");
            //
            // index = SubStrMatch.KMPIndexOfSubStr(mainStr, subStr);
            // Console.WriteLine($"KMP匹配模式：{subStr}在{mainStr}中首次出现的位置是{index}");

            BinaryTree<int> tree = new();
            tree.CreateByInput(tree.Root);
            tree.PreOrderTraverse(tree.Root);
        }
    }
}